﻿namespace Site2AppWP8.Config
{
    using System;
    using System.Runtime.Serialization;

    [DataContract]
    public class BarButton
    {
        public BarButton()
        {
        }

        [DataMember(Name = "label")]
        public string Label
        {
            get;
            set;
        }

        [DataMember(Name = "icon")]
        public string Icon { get; set; }

        [DataMember(Name = "iconUrl")]
        public string IconUrl
        {
            get;
            set;
        }

        public Uri IconUri
        {
            get
            {
                return new Uri(this.IconUrl, UriKind.Relative);
            }
        }

        public Uri Action
        {
            get
            {
                return new Uri(this.ActionString);
            }
        }

        [DataMember(Name = "action")]
        public string ActionString
        {
            get;
            set;
        }
    }
}
